using SS;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
namespace TVSGPP.dir
{
	public class frmIngredient : Form
	{
		private Func objFunc = new Func();
		private string currID = "0";
		private IContainer components = null;
		private Button btnTab3Save;
		private Button btnTab3Close;
		private Button btnUpdate;
		private Button btnAdd;
		private Button btnButton1;
		private TextBox txtName;
		private Button btnDel;
		private Button lblHeader;
		private BindingNavigator bindingNavigator1;
		private ToolStripLabel bindingNavigatorCountItem;
		private ToolStripButton bindingNavigatorMoveFirstItem;
		private ToolStripButton bindingNavigatorMovePreviousItem;
		private ToolStripSeparator bindingNavigatorSeparator;
		private ToolStripTextBox bindingNavigatorPositionItem;
		private ToolStripSeparator bindingNavigatorSeparator1;
		private ToolStripButton bindingNavigatorMoveNextItem;
		private ToolStripButton bindingNavigatorMoveLastItem;
		private ToolStripSeparator bindingNavigatorSeparator2;
		private GroupBox groupBox1;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
		private DataGridView dgvPriceBase;
		private DataGridViewTextBoxColumn DID;
		private DataGridViewTextBoxColumn Column2;
		public frmIngredient()
		{
			this.InitializeComponent();
		}
		private void frmPriceBaseConfig_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyData == Keys.Escape)
			{
				this.btnTab3Close.PerformClick();
			}
		}
		private void btnTab3Close_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void frmPriceBaseConfig_Load(object sender, EventArgs e)
		{
			this.getData();
		}
		private void btnUpdate_Click(object sender, EventArgs e)
		{
			this.txtName.ReadOnly = false;
			this.btnTab3Save.Enabled = true;
			this.txtName.Focus();
		}
		private void btnTab3Save_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.txtName.Text.Trim() != "")
				{
					if (this.currID == "0" && this.checkExistsName(this.txtName.Text))
					{
						MessageBox.Show("Hoạt chất bạn dự định thêm mới đã tồn tại\r\nBạn hãy chọn tên hoạt chất khác", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
					else
					{
						this.updatePriceBase(this.currID, this.txtName.Text);
						this.txtName.ReadOnly = true;
						this.btnTab3Save.Enabled = false;
						this.getData();
					}
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
				this.txtName.ReadOnly = true;
				this.btnTab3Save.Enabled = false;
			}
		}
		private void getData()
		{
			SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
			sqlConnection.Open();
			SqlDataAdapter sqlDataAdapter = new SqlDataAdapter("SELECT * FROM [TabIngredient]", sqlConnection);
			DataSet dataSet = new DataSet();
			sqlDataAdapter.Fill(dataSet, "TabIngredient");
			BindingSource bindingSource = new BindingSource();
			bindingSource.DataSource = dataSet.Tables["TabIngredient"];
			this.bindingNavigator1.BindingSource = bindingSource;
			this.dgvPriceBase.DataSource = bindingSource;
			sqlConnection.Close();
			sqlConnection.Dispose();
		}
		private bool checkExistsName(string Name)
		{
			SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
			sqlConnection.Open();
			SqlCommand sqlCommand = new SqlCommand("SELECT * FROM [TabIngredient] WHERE [Name] = '" + Name + "'", sqlConnection);
			SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
			bool result = sqlDataReader.HasRows;
			sqlConnection.Close();
			sqlConnection.Dispose();
			return result;
		}
		public int updatePriceBase(string ID, string Name)
		{
			int result;
			try
			{
				SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
				sqlConnection.Open();
				SqlCommand sqlCommand = new SqlCommand("sp_TabIngredient", sqlConnection);
				sqlCommand.CommandType = CommandType.StoredProcedure;
				sqlCommand.Parameters.Add("ID", SqlDbType.Int);
				sqlCommand.Parameters.Add("Name", SqlDbType.NVarChar, 500);
				try
				{
					sqlCommand.Parameters["ID"].Value = ID;
				}
				catch
				{
					sqlCommand.Parameters["ID"].Value = 0;
				}
				sqlCommand.Parameters["Name"].Value = Name;
				sqlCommand.ExecuteNonQuery();
				sqlConnection.Close();
				sqlConnection.Dispose();
				result = 0;
			}
			catch
			{
				result = 1;
			}
			return result;
		}
		private void btnAdd_Click(object sender, EventArgs e)
		{
			this.txtName.Text = "";
			this.currID = "0";
			this.txtName.ReadOnly = false;
			this.btnTab3Save.Enabled = true;
			this.txtName.Focus();
		}
		private void dgvPriceBase_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				this.currID = this.dgvPriceBase.Rows[e.RowIndex].Cells[0].Value.ToString();
				this.txtName.Text = this.dgvPriceBase.Rows[e.RowIndex].Cells[1].Value.ToString();
			}
			catch
			{
			}
		}
		private void btnDel_Click(object sender, EventArgs e)
		{
			if (this.currID != "0")
			{
				if (MessageBox.Show("Bạn có chắc chắn muốn xoá hoạt chất này không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
				{
					SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
					sqlConnection.Open();
					SqlCommand sqlCommand = sqlConnection.CreateCommand();
					sqlCommand.CommandText = "DELETE [TabIngredient] WHERE [ID] = " + this.currID;
					sqlCommand.ExecuteNonQuery();
					sqlConnection.Close();
					sqlConnection.Dispose();
					this.getData();
				}
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmIngredient));
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			this.btnTab3Save = new Button();
			this.btnTab3Close = new Button();
			this.btnUpdate = new Button();
			this.btnAdd = new Button();
			this.btnButton1 = new Button();
			this.txtName = new TextBox();
			this.btnDel = new Button();
			this.lblHeader = new Button();
			this.bindingNavigator1 = new BindingNavigator(this.components);
			this.bindingNavigatorCountItem = new ToolStripLabel();
			this.bindingNavigatorMoveFirstItem = new ToolStripButton();
			this.bindingNavigatorMovePreviousItem = new ToolStripButton();
			this.bindingNavigatorSeparator = new ToolStripSeparator();
			this.bindingNavigatorPositionItem = new ToolStripTextBox();
			this.bindingNavigatorSeparator1 = new ToolStripSeparator();
			this.bindingNavigatorMoveNextItem = new ToolStripButton();
			this.bindingNavigatorMoveLastItem = new ToolStripButton();
			this.bindingNavigatorSeparator2 = new ToolStripSeparator();
			this.groupBox1 = new GroupBox();
			this.dgvPriceBase = new DataGridView();
			this.DID = new DataGridViewTextBoxColumn();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn();
			((ISupportInitialize)this.bindingNavigator1).BeginInit();
			this.bindingNavigator1.SuspendLayout();
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.dgvPriceBase).BeginInit();
			base.SuspendLayout();
			this.btnTab3Save.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnTab3Save.BackColor = Color.FromArgb(192, 255, 255);
			this.btnTab3Save.Cursor = Cursors.Hand;
			this.btnTab3Save.Enabled = false;
			this.btnTab3Save.FlatStyle = FlatStyle.System;
			this.btnTab3Save.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnTab3Save.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnTab3Save.Location = new Point(188, 529);
			this.btnTab3Save.Name = "btnTab3Save";
			this.btnTab3Save.Size = new Size(90, 30);
			this.btnTab3Save.TabIndex = 4;
			this.btnTab3Save.Text = "Ghi nhận";
			this.btnTab3Save.UseVisualStyleBackColor = false;
			this.btnTab3Save.Click += new EventHandler(this.btnTab3Save_Click);
			this.btnTab3Close.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnTab3Close.BackColor = Color.FromArgb(192, 255, 255);
			this.btnTab3Close.Cursor = Cursors.Hand;
			this.btnTab3Close.FlatStyle = FlatStyle.System;
			this.btnTab3Close.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnTab3Close.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnTab3Close.Location = new Point(783, 529);
			this.btnTab3Close.Name = "btnTab3Close";
			this.btnTab3Close.Size = new Size(94, 30);
			this.btnTab3Close.TabIndex = 6;
			this.btnTab3Close.Text = "Thoát  [ ESC ]";
			this.btnTab3Close.UseVisualStyleBackColor = false;
			this.btnTab3Close.Click += new EventHandler(this.btnTab3Close_Click);
			this.btnUpdate.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnUpdate.BackColor = Color.FromArgb(192, 255, 255);
			this.btnUpdate.Cursor = Cursors.Hand;
			this.btnUpdate.FlatStyle = FlatStyle.System;
			this.btnUpdate.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnUpdate.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnUpdate.Location = new Point(97, 529);
			this.btnUpdate.Name = "btnUpdate";
			this.btnUpdate.Size = new Size(90, 30);
			this.btnUpdate.TabIndex = 3;
			this.btnUpdate.Text = "Cập nhật";
			this.btnUpdate.UseVisualStyleBackColor = false;
			this.btnUpdate.Click += new EventHandler(this.btnUpdate_Click);
			this.btnAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAdd.BackColor = Color.FromArgb(192, 255, 255);
			this.btnAdd.Cursor = Cursors.Hand;
			this.btnAdd.FlatStyle = FlatStyle.System;
			this.btnAdd.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnAdd.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnAdd.Location = new Point(6, 529);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new Size(90, 30);
			this.btnAdd.TabIndex = 2;
			this.btnAdd.Text = "Thêm mới";
			this.btnAdd.UseVisualStyleBackColor = false;
			this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
			this.btnButton1.BackColor = SystemColors.ButtonFace;
			this.btnButton1.FlatAppearance.BorderSize = 0;
			this.btnButton1.FlatStyle = FlatStyle.Flat;
			this.btnButton1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnButton1.Location = new Point(22, 24);
			this.btnButton1.Name = "btnButton1";
			this.btnButton1.Size = new Size(105, 24);
			this.btnButton1.TabIndex = 17;
			this.btnButton1.Text = "Tên hoạt chất :";
			this.btnButton1.TextAlign = ContentAlignment.MiddleRight;
			this.btnButton1.UseVisualStyleBackColor = false;
			this.txtName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtName.BackColor = Color.White;
			this.txtName.Font = new Font("Arial", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtName.Location = new Point(129, 24);
			this.txtName.Name = "txtName";
			this.txtName.ReadOnly = true;
			this.txtName.Size = new Size(729, 25);
			this.txtName.TabIndex = 0;
			this.btnDel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnDel.BackColor = Color.FromArgb(192, 255, 255);
			this.btnDel.Cursor = Cursors.Hand;
			this.btnDel.FlatStyle = FlatStyle.System;
			this.btnDel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnDel.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnDel.Location = new Point(279, 529);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new Size(90, 30);
			this.btnDel.TabIndex = 5;
			this.btnDel.Text = "Xoá bỏ";
			this.btnDel.UseVisualStyleBackColor = false;
			this.btnDel.Click += new EventHandler(this.btnDel_Click);
			this.lblHeader.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblHeader.BackColor = SystemColors.Control;
			this.lblHeader.FlatAppearance.BorderSize = 0;
			this.lblHeader.FlatStyle = FlatStyle.Flat;
			this.lblHeader.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblHeader.Location = new Point(6, 7);
			this.lblHeader.Name = "lblHeader";
			this.lblHeader.Size = new Size(871, 25);
			this.lblHeader.TabIndex = 18;
			this.lblHeader.Text = "DANH MỤC HOẠT CHẤT";
			this.lblHeader.UseVisualStyleBackColor = false;
			this.bindingNavigator1.AddNewItem = null;
			this.bindingNavigator1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.bindingNavigator1.BackColor = SystemColors.ButtonFace;
			this.bindingNavigator1.CountItem = this.bindingNavigatorCountItem;
			this.bindingNavigator1.CountItemFormat = "/ {0}";
			this.bindingNavigator1.DeleteItem = null;
			this.bindingNavigator1.Dock = DockStyle.None;
			this.bindingNavigator1.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.bindingNavigator1.Items.AddRange(new ToolStripItem[]
			{
				this.bindingNavigatorMoveFirstItem,
				this.bindingNavigatorMovePreviousItem,
				this.bindingNavigatorSeparator,
				this.bindingNavigatorPositionItem,
				this.bindingNavigatorCountItem,
				this.bindingNavigatorSeparator1,
				this.bindingNavigatorMoveNextItem,
				this.bindingNavigatorMoveLastItem,
				this.bindingNavigatorSeparator2
			});
			this.bindingNavigator1.Location = new Point(6, 423);
			this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
			this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem;
			this.bindingNavigator1.MoveNextItem = this.bindingNavigatorMoveNextItem;
			this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
			this.bindingNavigator1.Name = "bindingNavigator1";
			this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem;
			this.bindingNavigator1.RenderMode = ToolStripRenderMode.Professional;
			this.bindingNavigator1.Size = new Size(233, 25);
			this.bindingNavigator1.TabIndex = 19;
			this.bindingNavigator1.Text = "bindingNavigator1";
			this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
			this.bindingNavigatorCountItem.Size = new Size(28, 22);
			this.bindingNavigatorCountItem.Text = "/ {0}";
			this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
			this.bindingNavigatorMoveFirstItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
//			//this.bindingNavigatorMoveFirstItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveFirstItem.Image");
			this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
			this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveFirstItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveFirstItem.Text = "Move first";
			this.bindingNavigatorMovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ////this.bindingNavigatorMovePreviousItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMovePreviousItem.Image");
			this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
			this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMovePreviousItem.Size = new Size(23, 22);
			this.bindingNavigatorMovePreviousItem.Text = "Move previous";
			this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
			this.bindingNavigatorSeparator.Size = new Size(6, 25);
			this.bindingNavigatorPositionItem.AccessibleName = "Position";
			this.bindingNavigatorPositionItem.AutoSize = false;
			this.bindingNavigatorPositionItem.BackColor = SystemColors.ButtonFace;
			this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
			this.bindingNavigatorPositionItem.Size = new Size(50, 23);
			this.bindingNavigatorPositionItem.Text = "0";
			this.bindingNavigatorPositionItem.TextBoxTextAlign = HorizontalAlignment.Center;
			this.bindingNavigatorPositionItem.ToolTipText = "Current position";
			this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
			this.bindingNavigatorSeparator1.Size = new Size(6, 25);
			this.bindingNavigatorMoveNextItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ////this.bindingNavigatorMoveNextItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveNextItem.Image");
			this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
			this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveNextItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveNextItem.Text = "Move next";
			this.bindingNavigatorMoveLastItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ////this.bindingNavigatorMoveLastItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveLastItem.Image");
			this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
			this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveLastItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveLastItem.Text = "Move last";
			this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
			this.bindingNavigatorSeparator2.Size = new Size(6, 25);
			this.groupBox1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.txtName);
			this.groupBox1.Controls.Add(this.btnButton1);
			this.groupBox1.Location = new Point(6, 457);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(871, 62);
			this.groupBox1.TabIndex = 20;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin hoạt chất";
			this.dgvPriceBase.AllowUserToAddRows = false;
			this.dgvPriceBase.AllowUserToDeleteRows = false;
			this.dgvPriceBase.AllowUserToResizeColumns = false;
			this.dgvPriceBase.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvPriceBase.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvPriceBase.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvPriceBase.BackgroundColor = Color.White;
			this.dgvPriceBase.BorderStyle = BorderStyle.Fixed3D;
			this.dgvPriceBase.ColumnHeadersHeight = 26;
			this.dgvPriceBase.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvPriceBase.Columns.AddRange(new DataGridViewColumn[]
			{
				this.DID,
				this.Column2
			});
			this.dgvPriceBase.EnableHeadersVisualStyles = false;
			this.dgvPriceBase.Location = new Point(6, 38);
			this.dgvPriceBase.Name = "dgvPriceBase";
			this.dgvPriceBase.ReadOnly = true;
			this.dgvPriceBase.RowHeadersVisible = false;
			dataGridViewCellStyle2.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvPriceBase.RowsDefaultCellStyle = dataGridViewCellStyle2;
			this.dgvPriceBase.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvPriceBase.Size = new Size(871, 382);
			this.dgvPriceBase.TabIndex = 21;
			this.dgvPriceBase.CellEnter += new DataGridViewCellEventHandler(this.dgvPriceBase_CellEnter);
			this.DID.DataPropertyName = "ID";
			this.DID.HeaderText = "DID";
			this.DID.Name = "DID";
			this.DID.ReadOnly = true;
			this.DID.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.DID.Visible = false;
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column2.DataPropertyName = "Name";
			this.Column2.HeaderText = "Tên hoạt chất";
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
			dataGridViewCellStyle3.Format = "D";
			dataGridViewCellStyle3.NullValue = null;
			this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle3;
			this.dataGridViewTextBoxColumn1.HeaderText = "ID";
			this.dataGridViewTextBoxColumn1.MinimumWidth = 100;
			this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
			this.dataGridViewTextBoxColumn1.ReadOnly = true;
			this.dataGridViewTextBoxColumn1.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn1.Visible = false;
			this.dataGridViewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.dataGridViewTextBoxColumn2.DataPropertyName = "Name";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle4.BackColor = Color.FromArgb(192, 255, 255);
			this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle4;
			this.dataGridViewTextBoxColumn2.HeaderText = "Tên hoạt chất";
			this.dataGridViewTextBoxColumn2.MinimumWidth = 100;
			this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
			this.dataGridViewTextBoxColumn2.ReadOnly = true;
			this.dataGridViewTextBoxColumn2.SortMode = DataGridViewColumnSortMode.NotSortable;
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(884, 566);
			base.Controls.Add(this.dgvPriceBase);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.btnDel);
			base.Controls.Add(this.btnAdd);
			base.Controls.Add(this.btnUpdate);
			base.Controls.Add(this.btnTab3Save);
			base.Controls.Add(this.bindingNavigator1);
			base.Controls.Add(this.lblHeader);
			base.Controls.Add(this.btnTab3Close);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmIngredient";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "THÔNG TIN HOẠT CHẤT";
			base.WindowState = FormWindowState.Maximized;
			base.Load += new EventHandler(this.frmPriceBaseConfig_Load);
			base.KeyDown += new KeyEventHandler(this.frmPriceBaseConfig_KeyDown);
			((ISupportInitialize)this.bindingNavigator1).EndInit();
			this.bindingNavigator1.ResumeLayout(false);
			this.bindingNavigator1.PerformLayout();
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.dgvPriceBase).EndInit();
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
